# export some key envars for use by all the other scripts
if (`/etc/chkconfig | grep "network " | sed -e "s/.*network *//"` == "off") then
set DNS_name = `$DT_utilities/set_names "local"`
set local_name = "$DNS_name"
setenv DT_network 0
else
set DNS_name = `$DT_utilities/set_names "bind nis local"`
set local_name = `$DT_utilities/set_names "local bind nis"`
setenv DT_network 1
endif
if ("$DNS_name" != "$local_name") then
$DT_xconfirm warn "Your host/domain name '$local_name' from /etc/hosts\
is different from your DNS host/domain name '$DNS_name'\n\
This will likely cause problems beyond just Toolbox viewing."
endif
switch ($#DNS_name)
case 0:
setenv DT_hostname ""
setenv DT_domain ""
breaksw
case 1:
setenv DT_hostname "$DNS_name[1]"
setenv DT_domain ""
breaksw
case 2:
setenv DT_hostname "$DNS_name[1]"
setenv DT_domain "$DNS_name[2]"
breaksw
endsw
#
# make sure necessary prerequsites are present
#
$DT_utilities/perl_check
if ($status != 0) exit
#
# make sure that this script is not invoked by cd'ing into the
# CDROM tree
# if so, CD ejection/cleanup will not be possible
#
amIOnCDROMTree
if ($status == 1) then
set cdir = `pwd`
$DT_xconfirm error "The current directory ($cdir) appears to be within the CDROM directory.\
Thus, you would not be able to eject the CD.\
Please re-run viewDT from another directory."
set err_stat=1
endif
#
# exit if any errors in previous checks
#
if ($err_stat == 1) then
if ("$rmdir" != "") rm -rf $rmdir
exit 0
endif
#
# put up the front end
#
set reply = ' '
set serverInstalled = 0
set serverStarted = 0
set clientStarted = 0
set serverStopped = 0
set serverUninstalled = 0
set httpServerStatus = Not_Running
set okServerStatus = Not_Running
set view_default = select
while ($reply != Quit)
set mesg = "Please select one of the following options :\n[Help] : On line Help\n[View] : View $DT_NAME\n[Quit] : Exit this session.\n-----------------------------\nhttp server status : $httpServerStatus\nOK server status : $okServerStatus"